using System;
using System.Reflection;
using System.Drawing;
using System.Drawing.Imaging;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using System.Windows.Forms;

using System.Security;
using System.Security.Permissions;
using System.Web;
using System.Web.Security;
using Microsoft.SharePoint.Security;
using stsdev.Builders.SolutionFiles;


namespace stsdev
{

    class WebPartSolutionProvider : ISolutionProvider
    {
        private ProjectFileBuilder _projectFileBuilder;

        public WebPartSolutionProvider()
        {
            _projectFileBuilder = new ProjectFileBuilder();
        }

        public string Title
        {
            get { return "Web Part Solution (C# Assembly)"; }
        }

        public void InitializeSolution()
        {
            SolutionBuilder.AssemblyDeployment = true;
            SolutionBuilder.SafeControlSettings = true;
            SolutionBuilder.DeploymentTarget = AssemblyDeploymentTarget.GlobalAssemblyCache;
            SolutionBuilder.CasPermissions = false;
        }

        public void AddSolutionItems()
        {
            WebPartBuilder.CreateWebPart("CustomWebPart1");
            WebPartBuilder.CreateWebPart("CustomWebPart2");
            WebPartBuilder.CreateWebPartFeature();
        }

        #region ISolutionProvider Members


        public IProjectFileBuilder ProjectProvider
        {
            get { return _projectFileBuilder; }
        }

        #endregion
    }
}